﻿namespace Offy.Itdev.BuyIn.Intranet.Core.Repositories
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.SharePoint;

    public interface IDao<T>
    {
        T GetById(int id);
        T Get(string query);
        int GetTotalRecord(string query);
        int GetTotalRecord(string query, string sortBy, bool isAscending, string recursive);

        IList<T> GetList(string query);
        IList<T> GetList(string query, int pageIndex, int pageSize, string recursive);

        int Add(T entity);
        void Update(T entity);
        void Delete(T entity);
    }
}
